package faktorI;

import java.io.Serializable;

public class Preduslov implements Serializable{
	private LstPredElem elemList;
	private double MB;
	private double MD;
	
	public Preduslov(){
		elemList = new LstPredElem();
	}
	
	public void setMB(double MB){this.MB = MB;}
	public void setMD(double MD){this.MD = MD;}


	public LstPredElem getElemList(){return elemList;}
	public double getMB(){return MB;}
	public double getMD(){return MD;}
	public double getFaktorI(){return MB - MD;}
	
	public void dodajPredElem(PredElem elem){elemList.dodaj(elem);}
	public void updateOpazanja(Opazanje operand){elemList.updateOpazanja(operand);}
	public boolean sadrziZakljucak(){
		if(elemList.sadrziZakljucak())return true;
		else return false;
	}
	
	public boolean jednako (Preduslov preduslov){
		if(this.elemList.jednako(preduslov.elemList))return true;
		else return false;
	}
	
	public void refresh(){elemList.refresh();}
	
	public String toString(){return elemList.toString();}
}
